package org.istt.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Village entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="TBL_VILLAGE"
    ,schema="dbo"
    ,catalog="onegate"
)

public class Village  implements java.io.Serializable {


    // Fields    

     private Long id;
     private District district;
     private String name;


    // Constructors

    /** default constructor */
    public Village() {
    }

    
    /** full constructor */
    public Village(District district, String name) {
        this.district = district;
        this.name = name;
    }

   
    // Property accessors
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="ID", unique=true, nullable=false)

    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="DISTRICT_ID")

    public District getDistrict() {
        return this.district;
    }
    
    public void setDistrict(District district) {
        this.district = district;
    }
    
    @Column(name="NAME")

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
   








}